// 字典定义
const dicts = {
	// 性别字典
	gender: [
		{ value: '1', label: '男' },
		{ value: '2', label: '女' },
		{ value: '3', label: '未知' }
	]
};
export function getLabel(type:any, value:any, defaultValue: string = ''): string {
	const items = dicts[type] || [];
	const item = items.find((item:any) => item.value === String(value));
	return item ? item.label : defaultValue;
}
export function getDict(type:any): Array<any> {
	return dicts[type] || [];
}
export default {
	dicts,
	getLabel,
	getDict
};
